import javax.swing.JPanel;
import javax.swing.SpringLayout;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Label;
import javax.swing.JTextField;

/**
 * This class will show labwork and prescription info.
 * 
 * @author ThunderDragon
 * @version 1.0
 */
public class OfficeProcedurePanel extends JPanel {
	private JTextField txtProcedureName;
	private JTextField txtProcedurePrice;
	private JTextField txtEquipment;
	private JTextField txtLabworkPrice;
	private JTextField txtPrescriptionName;
	private JTextField txtDosage;
	private JTextField txtPrescriptionPrice;

	/**
	 * Office Procedure Panel
	 */
	public OfficeProcedurePanel() {
		SpringLayout springLayout = new SpringLayout();
		setLayout(springLayout);

		JLabel lblOfficeProcedure = new JLabel("Office Procedure");
		springLayout.putConstraint(SpringLayout.NORTH, lblOfficeProcedure, 10,
				SpringLayout.NORTH, this);
		springLayout.putConstraint(SpringLayout.WEST, lblOfficeProcedure, 136,
				SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, lblOfficeProcedure, 280,
				SpringLayout.WEST, this);
		lblOfficeProcedure.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC,
				16));
		add(lblOfficeProcedure);

		JLabel lblEquipment = new JLabel("Equipment:\r\n");
		springLayout.putConstraint(SpringLayout.WEST, lblEquipment, 33,
				SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, lblEquipment, -344,
				SpringLayout.EAST, this);
		lblEquipment.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
		add(lblEquipment);

		JLabel lblNewLabel = new JLabel("Procedure Name:");
		springLayout.putConstraint(SpringLayout.WEST, lblNewLabel, 103,
				SpringLayout.WEST, this);
		lblNewLabel.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
		add(lblNewLabel);

		JLabel lblProcedurePrice = new JLabel("Procedure Price:");
		springLayout.putConstraint(SpringLayout.NORTH, lblProcedurePrice, 6,
				SpringLayout.SOUTH, lblNewLabel);
		springLayout.putConstraint(SpringLayout.WEST, lblProcedurePrice, 103,
				SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, lblProcedurePrice, 0,
				SpringLayout.EAST, lblNewLabel);
		lblProcedurePrice.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC,
				12));
		add(lblProcedurePrice);

		JLabel lblNewLabel_1 = new JLabel("Labwork\r\n");
		springLayout.putConstraint(SpringLayout.SOUTH, lblNewLabel_1, -135,
				SpringLayout.SOUTH, this);
		springLayout.putConstraint(SpringLayout.NORTH, lblEquipment, 25,
				SpringLayout.SOUTH, lblNewLabel_1);
		springLayout.putConstraint(SpringLayout.WEST, lblNewLabel_1, 0,
				SpringLayout.WEST, lblEquipment);
		springLayout.putConstraint(SpringLayout.EAST, lblNewLabel_1, 106,
				SpringLayout.WEST, this);
		lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
		add(lblNewLabel_1);

		Label label = new Label("Prescription");
		springLayout.putConstraint(SpringLayout.WEST, label, 124,
				SpringLayout.EAST, lblNewLabel_1);
		springLayout.putConstraint(SpringLayout.SOUTH, label, 0,
				SpringLayout.SOUTH, lblNewLabel_1);
		label.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
		add(label);

		JLabel lblNewLabel_2 = new JLabel("Labwork Price:");
		springLayout.putConstraint(SpringLayout.NORTH, lblNewLabel_2, 16,
				SpringLayout.SOUTH, lblEquipment);
		springLayout.putConstraint(SpringLayout.WEST, lblNewLabel_2, 33,
				SpringLayout.WEST, this);
		lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
		add(lblNewLabel_2);

		JLabel lblPrescriptionName = new JLabel("Prescription Name:");
		springLayout.putConstraint(SpringLayout.NORTH, lblPrescriptionName, 0,
				SpringLayout.NORTH, lblEquipment);
		lblPrescriptionName.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC,
				12));
		add(lblPrescriptionName);

		JLabel lblPrescription = new JLabel("Prescription Dosage:\r\n");
		springLayout.putConstraint(SpringLayout.NORTH, lblPrescription, 0,
				SpringLayout.NORTH, lblNewLabel_2);
		springLayout.putConstraint(SpringLayout.EAST, lblPrescription, -92,
				SpringLayout.EAST, this);
		lblPrescription
				.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
		add(lblPrescription);

		txtProcedureName = new JTextField();
		springLayout.putConstraint(SpringLayout.NORTH, lblNewLabel, 2,
				SpringLayout.NORTH, txtProcedureName);
		springLayout.putConstraint(SpringLayout.EAST, lblNewLabel, -21,
				SpringLayout.WEST, txtProcedureName);
		springLayout.putConstraint(SpringLayout.WEST, txtProcedureName, 0,
				SpringLayout.WEST, label);
		springLayout.putConstraint(SpringLayout.SOUTH, txtProcedureName, -225,
				SpringLayout.SOUTH, this);
		springLayout.putConstraint(SpringLayout.EAST, txtProcedureName, 0,
				SpringLayout.EAST, label);
		add(txtProcedureName);
		txtProcedureName.setColumns(10);

		txtProcedurePrice = new JTextField();
		springLayout.putConstraint(SpringLayout.NORTH, txtProcedurePrice, -2,
				SpringLayout.NORTH, lblProcedurePrice);
		springLayout.putConstraint(SpringLayout.WEST, txtProcedurePrice, 0,
				SpringLayout.WEST, label);
		springLayout.putConstraint(SpringLayout.EAST, txtProcedurePrice, 0,
				SpringLayout.EAST, label);
		add(txtProcedurePrice);
		txtProcedurePrice.setColumns(10);

		txtEquipment = new JTextField();
		springLayout.putConstraint(SpringLayout.WEST, lblPrescriptionName, 32,
				SpringLayout.EAST, txtEquipment);
		springLayout.putConstraint(SpringLayout.WEST, txtEquipment, 26,
				SpringLayout.EAST, lblEquipment);
		springLayout.putConstraint(SpringLayout.EAST, txtEquipment, 92,
				SpringLayout.EAST, lblEquipment);
		springLayout.putConstraint(SpringLayout.NORTH, txtEquipment, -2,
				SpringLayout.NORTH, lblEquipment);
		add(txtEquipment);
		txtEquipment.setColumns(10);

		txtLabworkPrice = new JTextField();
		springLayout.putConstraint(SpringLayout.WEST, txtLabworkPrice, 132,
				SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, lblNewLabel_2, -3,
				SpringLayout.WEST, txtLabworkPrice);
		springLayout.putConstraint(SpringLayout.EAST, txtLabworkPrice, -252,
				SpringLayout.EAST, this);
		springLayout.putConstraint(SpringLayout.WEST, lblPrescription, 32,
				SpringLayout.EAST, txtLabworkPrice);
		springLayout.putConstraint(SpringLayout.NORTH, txtLabworkPrice, -2,
				SpringLayout.NORTH, lblNewLabel_2);
		add(txtLabworkPrice);
		txtLabworkPrice.setColumns(10);

		txtPrescriptionName = new JTextField();
		springLayout.putConstraint(SpringLayout.WEST, txtPrescriptionName, 364,
				SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, lblPrescriptionName, -6,
				SpringLayout.WEST, txtPrescriptionName);
		springLayout.putConstraint(SpringLayout.NORTH, txtPrescriptionName, -2,
				SpringLayout.NORTH, lblEquipment);
		springLayout.putConstraint(SpringLayout.EAST, txtPrescriptionName, 430,
				SpringLayout.WEST, this);
		add(txtPrescriptionName);
		txtPrescriptionName.setColumns(10);

		txtDosage = new JTextField();
		springLayout.putConstraint(SpringLayout.NORTH, txtDosage, 6,
				SpringLayout.SOUTH, txtPrescriptionName);
		springLayout.putConstraint(SpringLayout.WEST, txtDosage, 6,
				SpringLayout.EAST, lblPrescription);
		springLayout.putConstraint(SpringLayout.EAST, txtDosage, -20,
				SpringLayout.EAST, this);
		add(txtDosage);
		txtDosage.setColumns(10);

		JLabel lblNewLabel_3 = new JLabel("Prescription Price:");
		springLayout.putConstraint(SpringLayout.EAST, lblNewLabel_3, 117,
				SpringLayout.WEST, label);
		lblNewLabel_3.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblNewLabel_3, 11,
				SpringLayout.SOUTH, lblPrescription);
		springLayout.putConstraint(SpringLayout.WEST, lblNewLabel_3, 0,
				SpringLayout.WEST, label);
		add(lblNewLabel_3);

		txtPrescriptionPrice = new JTextField();
		springLayout.putConstraint(SpringLayout.NORTH, txtPrescriptionPrice, 6,
				SpringLayout.SOUTH, txtDosage);
		springLayout.putConstraint(SpringLayout.WEST, txtPrescriptionPrice, 0,
				SpringLayout.WEST, txtPrescriptionName);
		springLayout.putConstraint(SpringLayout.EAST, txtPrescriptionPrice, 0,
				SpringLayout.EAST, txtPrescriptionName);
		add(txtPrescriptionPrice);
		txtPrescriptionPrice.setColumns(10);
		//setProcedureName(ProcedureDatabase.PrescriptionList)
	}
	
	/**
	 * Set procedure name
	 * @param procedureName The procedure name.
	 */
	public void setProcedureName(String procedureName){
		txtProcedureName.setText(procedureName);
	}
	
	/**
	 * Set procedure price
	 * @param procedurePrice The procedure price.
	 */
	public void setProcedurePrice(String procedurePrice){
		txtProcedurePrice.setText(procedurePrice);
	}
	
	/**
	 * Set equipment
	 * @param equipment The equipment.
	 */
	public void setEquipment(String equipment){
		txtEquipment.setText(equipment);
	}
	
	/**
	 * Set labwork price.
	 * @param labworkPrice The labwork price.
	 */
	public void setLabworkPrice(String labworkPrice){
		txtLabworkPrice.setText(labworkPrice);
	}
	
	/**
	 * Set prescription name
	 * @param prescriptionName The prescription name.
	 */
	public void setPrescriptionName(String prescriptionName){
		txtPrescriptionName.setText(prescriptionName);
	}
	
	/**
	 * Set prescription dosage.
	 * @param dosage The prescription dosage.
	 */
	public void setPrescriptionDosage(String dosage){
		txtDosage.setText(dosage);
	}
	
	/**
	 * Set prescription price.
	 * @param prescriptionPrice The prescription price.
	 */
	public void setPrescriptionPrice(String prescriptionPrice){
		txtPrescriptionPrice.setText(prescriptionPrice);
	}
}